package com.weigang.hello.controller;

import com.weigang.hello.dto.Person;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {

    @Resource
    Person person;

    @GetMapping("/hello1")
    public Person hello1() {
        return person;
    }

    @GetMapping("/hello")
    public String hello() {
        return "Hello World!";
    }

}
